Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specialize integer numeric driver bindings #4588

Merged
merged 2 commits into from
Sep 18, 2023

Conversation

MariusVolkhart
Copy link
Contributor

Use specialized methods for interacting with the drivers when working with integer numeric types in Postgres. The JdbcDriver already had support for this. Support for the R2dbcDriver has been added.

Specialization on Postgres makes a difference to what gets sent over the wire. I didn't look into other DBMS.

Allow specialization of integer types to match more of the ones in JdbcDriver.
The Postgres JDBC driver and wire protocol treat varying integer sizes differently. For example, an Int only transfers 4 bytes, while Long transfers the full 8. Since we have the ability to call the proper JDBC methods, we should do so.
Copy link
Collaborator

@hfhbd hfhbd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@hfhbd hfhbd merged commit 2530d36 into sqldelight:master Sep 18, 2023
7 checks passed
@lnhrdt lnhrdt mentioned this pull request Nov 3, 2023
@MariusVolkhart MariusVolkhart deleted the mv/postgresTypes branch November 6, 2023 18:55
hfhbd pushed a commit that referenced this pull request Apr 2, 2024
* Add overloads to R2dbcDriver for fine-grained types

Allow specialization of integer types to match more of the ones in JdbcDriver.

* Specialize Postgres integer JDBC interactions

The Postgres JDBC driver and wire protocol treat varying integer sizes differently. For example, an Int only transfers 4 bytes, while Long transfers the full 8. Since we have the ability to call the proper JDBC methods, we should do so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants